<%@page contentType="text/html; charset=UTF-8"%>
<%@taglib uri="/WEB-INF/struts-tags.tld" prefix="s"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>票易信息管理系统</title>
<link rel="stylesheet" href="/css/admin.css" type="text/css"/>
<script type="text/javascript" src="/js/jquery-1.6.1.min.js"></script>
</head>
<body>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table align=center width="705" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td id="randomImage">
    </td>
  </tr>
</table>
<table align=center width="705" border="0" cellspacing="0" cellpadding="0">
  <tr>
  	<td width="300">
  	<s:fielderror><s:param>username</s:param></s:fielderror>
    </td>
    <td>
		<form name="login" id="login" method="post" action="/admin_login.action" onsubmit="VF_loginform();return false;">
			<input name="action" type="hidden" value="login" />
			用户名：<input name="username" type="text" id="username" size="12" />
			密码：<input name="password" type="password" id="password" size="10" />
			<img alt="验证码" src="/authimg" align="absmiddle" />
			<input name="verifycode" type="text" value="" size="5" maxlength="4" />
			<input name="imageField" value="登陆" type="submit" />
		</form>
    </td>
  </tr>
</table>
<script type="text/javascript">
function displayRandomImage(){
	var n = new Date().getSeconds();
	n=(n%6)+1;
	$('#randomImage').html('<image src="/images/admin/'+n+'.jpg"/>');
}
function VF_loginform(){ 
    var errMsg = "";
    if ($('#password').val() == ""){
        errMsg = "请填写密码！";
    }
    if ($('#username').val() == ""){
        errMsg = "请填写用户名！";
    }
    if (errMsg != ""){
        alert(errMsg);
    }
    else document.getElementById('login').submit();
}
displayRandomImage();
if(top.location!=self.location){
  top.location = self.location;
}
</script>
</body>
</html>
